package com.zzsy.shoppingpro.server;

import com.zzsy.shoppingpro.basebean.BaseBean;
import com.zzsy.shoppingpro.community.bean.HotPostBean;
import com.zzsy.shoppingpro.community.bean.NewPostBean;
import com.zzsy.shoppingpro.home.bean.HomeBean;
import com.zzsy.shoppingpro.type.bean.TagBean;
import com.zzsy.shoppingpro.type.bean.TypeBean;
import com.zzsy.shoppingpro.user.bean.GetCodeBean;
import com.zzsy.shoppingpro.user.bean.PhoneLoginBean;
import com.zzsy.shoppingpro.user.bean.UserInfoBean;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2019/8/16 0016.
 * 请求接口 的接口回调
 */

public interface MainService {

    /**
     * 获取验证码接口
     */
    @FormUrlEncoded
    @POST("message/getVerificationCode")
    Observable<BaseBean<GetCodeBean>> postPhoneCode(@Field("phone") String phone);

    /**
     * 通过电话号进行登录
     *
     */
    @FormUrlEncoded
    @POST("/auth/codeLogin")
    Observable<BaseBean<PhoneLoginBean>> getPhoneLogin(
            @Field("phone") String phone,
            @Field("msgId") String msgId,
            @Field("code") String code
    );

    /**
     * 首页数据
     * */
    @GET("HOME_URL.json")
    Observable<BaseBean<HomeBean.ResultBean>> getHomeData();

    /**
     * 小裙子
     * */
    @GET("SKIRT_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType0Data();
    /**
     * 上衣
     * */
    @GET("JACKET_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType1Data();
    /**
     * 下装
     * */
    @GET("PANTS_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType2Data();
    /**
     * 外套
     * */
    @GET("OVERCOAT_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType3Data();
    /**
     * 配件
     * */
    @GET("ACCESSORY_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType4Data();
    /**
     * 包包
     * */
    @GET("BAG_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType5Data();
    /**
     * 装扮
     * */
    @GET("DRESS_UP_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType6Data();
    /**
     * 居家债品
     * */
    @GET("HOME_PRODUCTS_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType7Data();
    /**
     * 办公文具
     * */
    @GET("STATIONERY_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType8Data();
    /**
     * 数码周边
     * */
    @GET("DIGIT_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType9Data();
    /**
     * 游戏专区
     * */
    @GET("GAME_URL.json")
    Observable<BaseBean<List<TypeBean.DataBean>>> getType10Data();

    /**
     * 标签接口
    * */
    @GET("TAG_URL.json")
    Observable<BaseBean<List<TagBean>>> getTagData();


    /**
     * 发现模块的接口
     * */
    @GET("HOT_POST_URL.json")
    Observable<BaseBean<List<HotPostBean>>> getCommunityData();
    @GET("NEW_POST_URL.json")
    Observable<BaseBean<List<NewPostBean>>> getCommunityNewData();

    /**
     * 获取用户数据
     * */
    @POST("/member/operation/getMemberInfo")
    Observable<BaseBean<UserInfoBean>> getUserInfoData();


}
